package com.shengqin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author Rui.Zhou
 * @since 2023-12-05
 */
@TableName("t_user")
@Schema(name = "User对象", description = "用户")
@Data
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "登录账号")
    private String account;

    @Schema(description = "登录密码")
    private String password;

    @Schema(description = "角色")
    private Integer roleId;

    @Schema(description = "账号状态 1.正常；2.禁用")
    private Integer state;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private Integer createUserId;

    private Boolean updatePwdFlag;

    @TableField(exist = false)
    private String oldPwd;
    @TableField(exist = false)
    private String newPwd;
    @TableField(exist = false)
    private String token;
    @TableField(exist = false)
    private List<Menu> rightMenus;
    @TableField(exist = false)
    private List<School> schoolList;
    @TableField(exist = false)
    private List<Integer> schoolIdList;
    @TableField(exist = false)
    private String verifyCode;
    @TableField(exist = false)
    private String verifyTk;
    @TableField(exist = false)
    private String name;
}
